<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //报错1
        export 1;

        //报错2
        var m = 1;
        export m;

        //正确写法1
        export var m=1;

        //正确写法2
        var m=1;
        export{m};

        //正确写法3
        var n=1;
        export{n as m}
    </script>
</body>
</html>